package problemLCR169;

//LCR169.招式拆解
//https://leetcode.cn/problems/di-yi-ge-zhi-chu-xian-yi-ci-de-zi-fu-lcof/?envType=problem-list-v2&envId=queue&difficulty=EASY

class Solution {
    public char dismantlingAction(String arr) {
        int[] hash = new int[128];
        for(char ch : arr.toCharArray()) {
            hash[ch]++;
        }
        for(char ch : arr.toCharArray()) {
            if(hash[ch] == 1) return ch;
        }
        return ' ';
    }
}